package com.king.springcloud.service;

import com.king.springcloud.entities.CommonResult;
import com.king.springcloud.entities.PaymentEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author king
 * @date 2020/9/3 23:43
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {

    /**
     * 查询
     * @param id 流水号
     * @return 结果
     */
    @GetMapping("/payment/get/{id}")
    CommonResult<PaymentEntity> getPaymentById(@PathVariable("id") Long id);

    @GetMapping("/payment/fegin/timeout")
    String paymentFeginTimeout();
}
